from django.db import models
from apps.common.base.models import BaseModel
from apps.merchant.shop.models import Shop


class AddrOfSelfPickup(BaseModel):

    shop = models.ForeignKey(Shop, related_name="shop_addrOfSelfPickup", verbose_name='商户',
                             on_delete=models.SET_NULL, null=True, blank=True, db_constraint=False)
    name = models.CharField("自提点名称", max_length=200, blank=True)
    contactName = models.CharField("联系人姓名", max_length=200, blank=True)
    contactPhone = models.CharField("联系人电话", max_length=200, blank=True)
    province = models.CharField("省", max_length=200, blank=True)
    city = models.CharField("市", max_length=200, blank=True)
    region = models.CharField("区", max_length=200, blank=True)
    area = models.CharField("区域", max_length=200, blank=True)
    detailAddr = models.CharField("详细地址", max_length=200, blank=True)
    default = models.BooleanField('是否默认', default=False)

    class Meta:
        verbose_name = 'AddrOfSelfPickup'
        verbose_name_plural = verbose_name
